<!DOCTYPE html>
<head></head>
<body>
  This page is using the Presentation API as a presentation controller.
</body>
<script>
  let connection = null;
  let connectionClosed = false;

  const presentationRequest = new PresentationRequest("fake-url");
  // Trigger creation of PresentationService in browser side.
  presentationRequest.getAvailability();

  function setConnection(newConnection) {
    connection = newConnection;
    connection.onclose = () => {
      connectionClosed = true;
    }
  }
</script>
